package com.qf.medicaldoctoradmin.illnesscare.article.controller;

import com.qf.common.common.R;
import com.qf.common.entity.IllnessCare;
import com.qf.medicaldoctoradmin.illnesscare.article.service.IllnessCareService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
@CrossOrigin
@RequestMapping("/illnessCare/article")
@Api(tags = "慢病护理API")
public class IllnessCareController {

    @Resource
    private IllnessCareService illnessCareService;

    @PostMapping("/select")
    @ApiOperation(value = "获取慢病护理文章详细信息", notes = "根据文章实体类来获取文章详细信息")
    public R selectList() {
        List<IllnessCare> illnessCare = illnessCareService.selectList();
        return R.ok(illnessCare);
    }
}
